package com.jrx.anytxn.param.service.product;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.i18n.response.TxnPage;
import com.jrx.anytxn.param.dto.product.PrAutoPaymentTableRep;
import com.jrx.anytxn.param.dto.product.PrAutoPaymentTableRes;

public interface IPrAutoPaymentTableService {

    /**
     * 根据租户编号，产品编号 查询
     */
    PrAutoPaymentTableRes findByTenIdAndProductId(String tenantId, String productId) throws TxnBizException;

    /**
     * 新增批扣规则
     */
    PrAutoPaymentTableRes addPrAutoPaymentTable(PrAutoPaymentTableRep request) throws TxnBizException;

    /**
     * 更新
     */
    PrAutoPaymentTableRes modifyPrAutoPaymentTable(PrAutoPaymentTableRep request) throws TxnBizException;

    /**
     * 根据租户ID和产品ID删除信息
     */
    Boolean deletePrAutoPaymentTable(String tenantId, String productId) throws TxnBizException;

    /**
     * 分页查询
     */
    TxnPage<PrAutoPaymentTableRes> findAllPageByTenantId(Integer pageNum, Integer pageSize, String tenantId) throws TxnException;


}
